package com.gusto.engine.colfil.neighborhood.storedistance;

import java.util.List;

import com.gusto.engine.colfil.Distance;

/**
 * <p>An interface for persisting and getting collaborative distances and neighborhoods.</p>
 * 
 * @author amokrane.belloui@gmail.com
 *
 */
public interface DistancePersistenceDAO {
	
	public void updateUserDistance(long user1, long user2, Distance distance);
	public void updateItemDistance(long item1, long item2, Distance distance);
	
	public List<Distance> getNearUsers(long userId);
	public List<Distance> getNearItems(long itemId);
	
	public List<Distance> getNearUsers(long userId, String formula, int MIN_SHARED_ITEM, double MIN_SIMILARITY);
	public List<Distance> getNearItems(long itemId, String formula, int MIN_SHARED_ITEM, double MIN_SIMILARITY);
	
	public void clean();
	
}
